package com.monkey.demolist.greendao;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Property;
import org.greenrobot.greendao.annotation.Generated;

/**
 * Description:
 * Author: Archur
 * Date: 2017-10-23
 * Time: 13:40
 */


@Entity //@Entity  表明这个实体类会在数据库中生成一个与之相对应的表
public class StudentMsgBean {

    @Id //@Id  对应数据表中的 Id 字段，有了解数据库的话，是一条数据的唯一标识
    private Long id;

    @Property(nameInDb = "STUDENTNUM")
    //@Property(nameInDb = “STUDENTNUM”) 　表名这个属性对应数据表中的 STUDENTNUM 字段。
    private String studentNum;

    @Property(nameInDb = "NAME")
    private String name;

    @Generated(hash = 381350025)
    public StudentMsgBean(Long id, String studentNum, String name) {
        this.id = id;
        this.studentNum = studentNum;
        this.name = name;
    }

    @Generated(hash = 160565988)
    public StudentMsgBean() {
    }

    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getStudentNum() {
        return this.studentNum;
    }

    public void setStudentNum(String studentNum) {
        this.studentNum = studentNum;
    }

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "StudentMsgBean{" +
                "id=" + id +
                ", studentNum='" + studentNum + '\'' +
                ", name='" + name + '\'' +
                '}';
    }
}
